package org.dromara.bzIns.domain.bo;

import org.dromara.bzIns.domain.InsInsure;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 保单记录业务对象 bz_ins_insure
 *
 * @author bz_huaYal9146
 * @date 2025-03-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = InsInsure.class, reverseConvertGenerate = false)
public class InsInsureBo extends BaseEntity {

    /**
     * 保单id
     */
    @NotNull(message = "保单id不能为空", groups = { EditGroup.class })
    private Long insureId;

    /**
     * 用户id
     */
    @NotNull(message = "用户id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long userId;

    /**
     * 用户汽车id
     */
    @NotNull(message = "用户汽车id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long carId;

    /**
     * 车牌号
     */
    @NotBlank(message = "车牌号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String carPlate;

    /**
     * 保险公司id
     */
    @NotNull(message = "保险公司id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long insCompanyId;

    /**
     * 保险公司名称
     */
    private String insCompanyName;

    /**
     * 投保时间
     */
    @NotNull(message = "投保时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date insuredTime;

    /**
     * 保障开始时间
     */
    @NotNull(message = "保障开始时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date guaranteeStartTime;

    /**
     * 保险金额
     */
    @NotNull(message = "保险金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal insuredAmount;

    /**
     * 实付款
     */
    @NotNull(message = "实付款不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal actualPay;

    /**
     * 有效期
     */
    private Date expirationDate;

    /**
     * 到期时间(由用户填入有效期和保单生效时间计算）
     */
    @NotNull(message = "到期时间(由用户填入有效期和保单生效时间计算）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date expirationTime;

    /**
     * 总保额
     */
    @NotNull(message = "总保额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal totalInsAmount;

    /**
     * 是否显示  0-显示，1-不显示
     */
    private Long isDisplay;
    /**
     * 保单状态：0-未生效，1-生效，2-已过期
     */
    private int checkStatus;


}
